package com.ifcar.app.bean;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import com.ifcar.app.util.StringUtil;

public class VoteBean implements Serializable {
	private static final long serialVersionUID = 2587269373826309402L;
	
	private String id;
	private List<Map<String, Object>> itemLsit;
	private String itemTitle;
	private String itemQuestion;
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public List<Map<String, Object>> getItemLsit() {
		return itemLsit;
	}
	public void setItemLsit(List<Map<String, Object>> itemLsit) {
		this.itemLsit = itemLsit;
	}
	public String getItemTitle() {
		return itemTitle;
	}
	public void setItemTitle(String itemTitle) {
		this.itemTitle = itemTitle;
	}
	public String getItemQuestion() {
		return itemQuestion;
	}
	public void setItemQuestion(String itemQuestion) {
		this.itemQuestion = itemQuestion;
	}
	public long getAllVoteNum(){
		long number = 0;
		for(Map<String,Object> m:itemLsit){
			int num = Integer.parseInt(StringUtil.GetString(m.get(StringUtil.VOTE_ITEM_NUM)));
			number += num;
		}
		return number;
	}
}
